<% content_for :action_nav do %>
<!-- begin action nav -->
<div id="page-nav">
  <ul id="act-nav" class="clear">
    <li><%= link_to_remote _('Delete these comments'), :confirm => _("Are you sure you wish to delete all of these comments?"),
        :url  => { :controller => 'articles', :action => 'destroy_comment' }, 
        :with => "ArticleForm.getAvailableComments().toQueryString('comment')"
      %></li>
  </ul>
</div>
<!-- /end action nav -->
<% end %>

<h3><%= pluralize(@comments.size, 'Unapproved Comment') %></h3>

<ul class="pagelist commentlist">
  <% @comments.reverse.each_with_index do |comment, i| -%>
  <li class="event-comment<%= " shade" if (i % 2 > 0) %>" id="comment-<%= comment.id %>">
    <h3><a name="comment-<%= comment.id %>"></a> <%= link_to comment.article.title, :controller => 'articles', :action => :edit, :id => comment.article %></h3>
    <blockquote><p>"<%= truncate strip_tags(comment.body), 255 %>"</p></blockquote>
    <span class="meta">
      <cite>&mdash; <%= author_link_for comment %><%= %( (#{comment.author_email})) unless comment.author_email.blank? %></cite>
      
    <% if comment.approved? -%>
      <%= link_to_remote _('Unapprove'), :url => { :action => 'unapprove', :controller => 'articles', :id => comment.article, :comment => comment } %> | 
    <% else -%>
      <%= link_to_remote _('Approve'),   :url => { :action => 'approve', :controller => 'articles', :id => comment.article, :comment => comment } %> | 
    <% end -%>
      <%= link_to_remote _('Delete'),    :url => { :action => 'destroy_comment', :controller => 'articles', :id => comment.article, :comment => comment } %>
    </span>
  </li>
  <% end -%>
</ul>
